package org.uiot.protocol.group

enum RuleMode {
    BasicRule(0), EmbeddedGroup(1)
    final int value

    private RuleMode(int value) { this.value = value }

    static RuleMode byValue(int val) {
        values().find { it.value == val } ?:
                { throw new IllegalArgumentException("RuleMode ${val} not found") }()
    }
}